home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex / packages / mfnfss / dccrstd.tex < prev    next >
Text File  |  1994-12-17  |  9KB  |  302 lines

  1. % \iffalse meta-comment
  2. %
  3. % Copyright 1994 the LaTeX3 project and the individual authors.
  4. % All rights reserved. For further copyright information see the file
  5. % legal.txt, and any other copyright indicated in this file.
  6. % This file is part of the LaTeX2e system.
  7. % ----------------------------------------
  8. %  This system is distributed in the hope that it will be useful,
  9. %  but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. %  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. % IMPORTANT NOTICE:
  12. % For error reports in case of UNCHANGED versions see bugs.txt.
  13. % Please do not request updates from us directly.  Distribution is
  14. % done through Mail-Servers and TeX organizations.
  15. % You are not allowed to change this file.
  16. % You are allowed to distribute this file under the condition that
  17. % it is distributed together with all files mentioned in manifest.txt.
  18. % If you receive only some of these files from someone, complain!
  19. % You are NOT ALLOWED to distribute this file alone.  You are NOT
  20. % ALLOWED to take money for the distribution or use of either this
  21. % file or a changed version, except for a nominal charge for copying
  22. % etc.
  23. % \fi
  24. % This files generates MF source files for producing Concrete Roman
  25. % fonts with Cork encoding. You need to have the DC/EC source
  26. % distribution which is *not* part of NFSS2 but can be found on the
  27. % usual archives or can be ordered from TeX organizations.
  28. %
  29. % This file is a copy of one of the DC distribution files with the
  30. % table entries changed so that it will produce Concrete Roman instead
  31. % of Computer Modern fonts. As an alternative you can copy the first
  32. % line which is flagged with `FMi' and place it in the table of the
  33. % file {\tt dcstdedt.tex} in order to produce all Metafont sources from
  34. % a single file.
  35. %
  36. % Usage:
  37. %
  38. % Run this file through TeX. This will generate a number of Metafont
  39. % source files for the Concrete Roman fonts. This will also generate a
  40. % single page of output showing a table of the fonts generated. (This
  41. % is much more interesting if you combined the table entry from this
  42. % file with the standard table entries for the Computer Modern fonts.)
  43. %
  44. % Then produce the fonts by running Metafont on the generated fonts.
  45. % For this you can use the batch file {\tt mfccr.bat} which was
  46. % generated by the previous step. This batch file is set up to run
  47. % under DOS and you may have to edit it first.
  48. %
  49. % The rest of this this file, except for the lines flagged with `FMi'
  50. % correspond to the original one from Norbert Schwarz.
  51. %
  52. % --------------------------------------------------------
  53. %
  54. %
  55. % Generating MF-files for DC/EC fonts            Version 1.1 / 22.3.1992
  56. %
  57. %  Running TeX with this file as an input results in a lot of
  58. %  Metafont font driver files (dcr5.mf, dcr6.mf, ..). The files
  59. %  which should be generated are marked in the following macro
  60. %  \FontsToBeGenerated. For each font there has to be an entry
  61. %  with the pt sizes the font should be generate with. Additionally
  62. %  in the heading \tablevalues all used pt sizes have to be mentioned,
  63. %  just to get an fine printout.
  64. %
  65. %  Furthermore there is a batch file which can be customized for the
  66. %  Metafont batch run.
  67. %
  68. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  69. %
  70. %  please change only here:
  71. %
  72. \long\def\FontsToBeGenerated{
  73.  
  74.      \tablevalues       ( 5 6 7 8 9 10 10.95[11] 12 14.4[14] 17.28[17] )
  75.  
  76.      % following line changed by FMi
  77.      \makefont dccr     ( 5 6 7 8 9 10 10.95[11] 12 14.4[14] 17.28[17] )
  78. }
  79. % If a font with a fraction, e.g. "7.5", should be generated
  80. % and the file name is not allowed to contain a period, an
  81. % optional file name part can be specified.
  82. %
  83. %      7.5[7h]
  84. %
  85. %      result in - may be - "dcr7h.mf" and an entry of "gensize:=7.5;"
  86. %      (The new value has to be specified in the \tablevalues-line too!
  87. %
  88. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  89. %
  90. %  The Batch file entries   ( #1 contains the fontname )
  91. %
  92. %   should be of the following form:
  93. %
  94. %    \def\BatchOutput{\BatchLine{...}%
  95. %                          ...
  96. %                     \BatchLine{...}}
  97. %
  98. %
  99. %  preset value, change \BatchOutput if you like ....
  100. %
  101. \def\BatchOutput#1{
  102.      \BatchLine{mf "&plain \string\mode:=oce; input #1"}
  103. }
  104. %
  105. %   File naming conventions:
  106. %
  107. \def\BatchFileName{mfccr.bat}      % FMi
  108. %
  109. %
  110. \def\MetafontFileExtension{.mf}
  111. %
  112. \def\modedef{} % e.g.  \def\modedef{\string\mode:=hplaser;}
  113. %
  114. %
  115. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  116. %
  117. % please  n o  changes from here, thanks !
  118. %
  119. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  120. %
  121. %
  122. % (Avoiding inspecting the macros (sigh!)
  123. %
  124. %   Norbert Schwarz, Dezember 1990
  125. %
  126. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  127. \magnification\magstep1
  128. \overfullrule=0pt
  129. %\tracingonline1
  130. %\tracingcommands=1
  131. %\tracingmacros=1
  132. % some token handling
  133. \let\EA\expandafter
  134. \def\JoinToks#1=(#2+#3){#1=\EA\EA\EA{\EA\the\EA#2\the#3}}
  135. \def\UpToHere{\relax}
  136. \def\IgnoreRest#1#2\UpToHere{#1}
  137. \def\IgnoreFirst#1#2\relax\UpToHere{#2}
  138. \def\First#1{\EA\IgnoreRest\the#1{}\UpToHere}
  139. \def\FirstOf#1{\EA\EA\EA{\EA\IgnoreRest\the#1{}\UpToHere}}
  140. \def\MoveFirst(#1to#2){#2\FirstOf#1}
  141. \def\Rest#1{\EA\IgnoreFirst\the#1\relax\UpToHere}
  142. \def\RestOf#1{\EA\EA\EA{\EA\IgnoreFirst\the#1\relax\UpToHere}}
  143. \def\MoveRest(#1to#2){#2=\RestOf{#1}}
  144. % borrowed from p. 132 in N.Schwarz, Introduction to TeX
  145. % (some advertising ..)
  146.  
  147. \newtoks\Basis
  148. \newtoks\Table
  149. \def\storetoks#1{\toks0={#1}\JoinToks\Table=(\Table+\toks0)}
  150. \Table={}
  151. %
  152. \newwrite \batchoutput
  153. \newwrite \fontoutput
  154. \def\today{\ifcase\month\or
  155.     January\or Februar\or March\or April\or May\or June\or
  156.     July\or August\or September\or October\or November\or December\fi,
  157.     \number\day,
  158.     \space\number\year}
  159.  
  160. \def\BatchLine#1{\immediate\write\batchoutput{#1}}
  161. \immediate\openout\batchoutput=\BatchFileName
  162.  
  163. \def\empty{}
  164. \def\minus{-}
  165. \def\blank{ }
  166. \def\singlefont#1 {%
  167.         \def\fontsize{#1}%\message{<#1>}%
  168.         \ifx\fontsize\minus\let\next\relax
  169.         \else
  170.             \ifx\fontsize\empty\let\next\singlefont
  171.             \else
  172.                 \ifx\fontsize\blank\let\next\singlefont
  173.                 \else
  174.                     \let\next\dofont
  175.           \fi\fi\fi
  176.         \next}
  177.  
  178. \def\doentry{\MoveFirst(\Workbase to\Htok)%
  179.              \Workbase=\RestOf\Workbase
  180.              \edef\doou{\the\Htok}%
  181.              \ifx\doou\fontsize
  182.                  \def\dooU{\storetoks{\hfill $\bullet$\hfill&}}%
  183.                  \let\weiter\dooU
  184.              \else
  185.                  \def\weiter{\storetoks{~\hfill&}\doentry}%
  186.              \fi\weiter}
  187.  
  188.  
  189. \def\singletablevalue#1 {%
  190.         \def\fontsize{#1}%
  191.         \ifx\fontsize\blank\let\next\singletablevalue
  192.         \else
  193.                 \ifx\minus\fontsize\let\next\relax
  194.                 \else\let\next\dotablevalue\fi
  195.         \fi
  196.         \next}
  197.  
  198. \newtoks\Htok
  199. \newtoks\Workbase
  200. \def\dotablevalue{\edef\dooo{\Htok={{\fontsize}}}%
  201.         \dooo
  202.         \EA\storetoks\EA{\fontsize&}%
  203.         \JoinToks\Basis=(\Basis+\Htok)\singletablevalue}
  204.  
  205. \def\tablevalues(#1){\storetoks{\bf Fonts &}\singletablevalue#1 -
  206.         \storetoks{\cr}}
  207.  
  208. \def\makefont #1 (#2){\JoinToks\Workbase=(\Basis+\Basis)%
  209.         \myc=0\immediate\write16{}%
  210.         \edef\fontnamebody{#1}%
  211.         \def\dostoretoks{\storetoks{#1 &}}\dostoretoks
  212.          \singlefont #2 - \storetoks{\cr}}
  213.  
  214. \def~{\ifdim\dimen0>0pt
  215.         \message{\number\dimen0}%
  216.         \global\advance\dimen0 by -5.25pt
  217.         \message{ }\fi}
  218.  
  219. \newcount\myc
  220. \def\extraspaces{\setbox0=\hbox{\tt\fontname}%
  221. \dimen0=78.75pt
  222. \advance\dimen0 by -\wd0\relax
  223.         \advance\myc by 1
  224.         \ifnum \myc=5
  225.         \immediate\write16{}%
  226.         \myc=0 \fi}
  227.  
  228.  
  229. \def\dofonttest#1[#2]#3\nothing{%
  230. \def\fontsize{#2}%
  231. \ifx\fontsize\empty
  232.         \def\fontsizename{#1}%
  233.         \def\fontsize{#1}%
  234. \else
  235.         \def\fontsize{#1}%
  236.         \def\fontsizename{#2}%
  237. \fi}
  238. \def\dofont{\doentry\expandafter\dofonttest\fontsize[]\nothing\Dofont}
  239.  
  240. {\catcode`\%=11
  241. \catcode`\|=14
  242. \gdef\Dofont{|
  243.   \edef\fontname{\fontnamebody\fontsizename\MetafontFileExtension}|
  244.   \edef\dowrite{|
  245.   \immediate\openout \fontoutput = \fontname|
  246.   \immediate\write
  247.      \fontoutput {% This is \fontname\space
  248.      in text format as of \today}|
  249.   \immediate\write \fontoutput {if unknown dxbase: input dxbase fi;}|
  250.   \immediate\write \fontoutput {}|
  251.   \immediate\write \fontoutput {\modedef}|
  252.   \immediate\write \fontoutput {gensize:=\fontsize;}|
  253.   \immediate\write \fontoutput {generate \fontnamebody}|
  254.   \immediate\closeout \fontoutput|
  255.   \BatchOutput{\fontnamebody\fontsizename}
  256.   \message{\fontname\blank}|\extraspaces~~~~~~~~~~~|
  257. }\dowrite\singlefont}}
  258. \immediate\write16{generated mf-files:}
  259. \immediate\write16{-------------------}
  260.  
  261. \nopagenumbers
  262.  
  263. \def\minimumbox#1{\setbox0=\hbox{#1}%
  264.         \ifdim\wd0>15pt \box0\else \hbox to 15pt{\hfil
  265.         \box0\hfil}\fi}
  266. \storetoks{\hrule
  267. \medskip
  268. \centerline{Overview DC/EC - Standard font set}
  269. \medskip
  270. \hrule
  271. \bigskip
  272. \noindent The following table describes the generated {*.mf} files which
  273. are needed for the setup of the standard DC/EC-font set.
  274. \bigskip
  275. \bigskip
  276. $$\vbox\bgroup\nointerlineskip\halign\bgroup#\hfil\quad&&\strut
  277.         \quad\minimumbox{#}\cr
  278. \noalign{\medskip}}
  279.  
  280.  
  281.  
  282. %\tracingonline1
  283. %\tracingmacros2
  284. %\tracingcommands1
  285.  
  286. \FontsToBeGenerated
  287.  
  288. \storetoks{\egroup\egroup$$}
  289.  
  290. \the\Table
  291. \end
  292.